import request from "@/utils/request";

// 查询课程章节列表
export function listCourseChapter(query) {
  return request({
    url: "/project/courseChapter/list",
    method: "get",
    params: query,
  });
}

// 查询课程章节详细
export function getCourseChapter(id) {
  return request({
    url: "/project/courseChapter/" + id,
    method: "get",
  });
}

// 新增课程章节
export function addCourseChapter(data) {
  return request({
    url: "/project/courseChapter",
    method: "post",
    data: data,
  });
}

// 修改课程章节
export function updateCourseChapter(data) {
  return request({
    url: "/project/courseChapter",
    method: "put",
    data: data,
  });
}

// 删除课程章节
export function delCourseChapter(id) {
  return request({
    url: "/project/courseChapter/" + id,
    method: "delete",
  });
}

// 配置小节
export function configSection(data) {
  return request({
    url: "/project/courseChapter/config",
    method: "post",
    data: data,
  });
}
